package com.rz.core.exception;


import com.rz.core.resp.RespEnum;

/**
 * Created by Rui.Zhou on 2017/3/20.
 * 签名错误exception
 */
public class GlobalException extends RuntimeException {
    private Integer code;
    public GlobalException(RespEnum resultEnum){
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public GlobalException(Integer code,String msg){
        super(msg);
        this.code = code;
    }

    public GlobalException(String s) {
        super(s);
        this.code = -1;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


}
